<ion-header>
    <ion-toolbar content-page>
        <ion-buttons start>
            <button ion-button icon-only  (click)="backClickHandle()">
                <i class="toolbar-back"></i>
            </button>
        </ion-buttons>
        <ion-title>
            收藏夹
        </ion-title>
        <ion-buttons end>
            <ion-buttons>
                <button ion-button icon-only adpmenutoggle>
                    <i class="toolbar-menu"></i>
                </button>
            </ion-buttons>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content>
    <div class="switch-bar" ion-fixed>
        <div (click)="switchList(1)" [class.selected]="listIndex==1">消息</div>
        <div (click)="switchList(2)" [class.selected]="listIndex==2">资讯</div>
    </div>
    <!--消息列表-->
    <ion-list [class.show]="listIndex==1" class="message" [virtualScroll]="messageList">

        <div *virtualItem="let msg" class="info-item message-panel">
            <ion-item-sliding #sliding (click)="goToDetail(msg.contentId)">
                <ion-item>
                    <p class="title-panel" [class.read]="msg.readFlag">{{msg.title}}</p>
                    <p class="time-panel">{{msg.publishTime?(msg.publishTime*1000|date:'yyyy/MM/dd HH:mm'):''}}</p>
                    <i class="into-arrow"></i>
                </ion-item>
                <ion-item-options side="right">
                    <button ion-button (click)="deleteMsgCollect($event,msg.contentId,sliding)">
                        取消<br/>
                        收藏
                    </button>
                </ion-item-options>
            </ion-item-sliding>
        </div>
    </ion-list>

    <div [class.adp-list-bottom-tip]=" messageList.length>0" [class.adp-list-noData]=" messageList.length==0&&msgRequestStatus" *ngIf="msgRequestStatus&&listIndex==1">
        <span *ngIf=" messageList.length>=6">到底了</span>
    </div>
    <div *ngIf=" messageList.length==0&&msgRequestStatus&&listIndex==1" class="no-data">
        <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
        <div class="no-data-txt">没有相关数据</div>
    </div>
    <!--资讯列表-->
    <ion-list class="info-bd" [virtualScroll]="infoList" [bufferRatio]=6  [class.show]="listIndex==2">
        <div *virtualItem="let item" #wrapper class="info-item">
            <ion-item-sliding #sliding>
                <ion-item>
                    <div class="info-card" (click)="goToInfoDetail(item.contentId,item.title,item.externalLink)">
                        <img src="{{item.listImageId?item.listImageId:'./assets/images/information/img_0.jpg'}}" alt="" *ngIf="item.listImageId">
                        <!--<ion-img [src]="item.listImageId?item.listImageId:''" alt="" *ngIf="item.listImageId"></ion-img>-->
                        <span class="space" *ngIf="!item.listImageId"></span>
                        <!--<adp-lazyload [lazysrc]="item.listImageId?item.listImageId:''"
                                      [distance]="0" [content]="content" [wrapper]="wrapper"
                                      [className]="imgClassName"></adp-lazyload>-->
                        <div class="info-content">
                            <div class="info-title">{{item.title}}</div>
                            <div class="info-time">{{item.publishTime?(item.publishTime*1000|date:'yyyy/MM/dd HH:mm'):''}}
                            </div>
                        </div>
                    </div>
                </ion-item>
                <ion-item-options side="right">
                    <button ion-button (click)="deleteInfoCollect($event,item.contentId,sliding)">
                        <!--<i></i>-->
                        取消<br/>
                        收藏
                    </button>
                </ion-item-options>
            </ion-item-sliding>
        </div>
    </ion-list>
    <div [class.adp-list-bottom-tip]="infoList.length>0" [class.adp-list-noData]="infoList.length==0&&infoRequestStatus" *ngIf="infoRequestStatus&&listIndex==2">
        <span *ngIf="infoList.length>=6">到底了</span>
    </div>
    <div *ngIf=" infoList.length==0&&infoRequestStatus&&listIndex==2" class="no-data">
        <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
        <div class="no-data-txt">没有相关数据</div>
    </div>
</ion-content>
